package DataView;
import java.util.Vector;

import Store.Class;
import Store.Parameter;
import Store.Type;

public class OperationInfo extends CDElementInfo {
	private Class ofClass;
	public Vector<Parameter> list_Parameter;
	private Type returnType;
	
	public void setInfo(String s, Class c, Vector<Parameter> pars, Type t)
	{
		super.setInfo(s);
		returnType=t;
		list_Parameter=pars;
		ofClass=c;
	}
	
	public Class containedIn()
	{
		return ofClass;
	}
	
	public Vector<Parameter> getAllParam()
	{
		return list_Parameter;
	}
	
	public Type getReturnType()
	{
		return returnType;
	}
	
	public Parameter getParameter(int i)
	{
		return list_Parameter.get(i);
	}
	
	public int parameterSize()
	{
		return list_Parameter.size();
	}
	
	public void setOfClass(Class c)
	{
		ofClass=c;
	}
	public OperationInfo clone()
	{
		OperationInfo clone = new OperationInfo();
		clone.setInfo(getName(), null, list_Parameter, returnType);
		return clone;
	}
}
